package com.pussinboots.morning.sync.exception;

import lombok.extern.apachecommons.CommonsLog;

@CommonsLog
public class SyncException extends RuntimeException {

    private Integer code;

    public SyncException(ExceptionEnum exceptionEnum) {
        super(exceptionEnum.getDescription());
        this.code = exceptionEnum.getCode();
        log.error(exceptionEnum.getDescription());
    }

    public Integer getCode() {
        return code;
    }
}
